|
The reactor design pattern is an event handling pattern for handling service requests delivered concurrently to a service handler by one or more inputs. The service handler then demultiplexes the incoming requests and dispatches them synchronously to the associated request handlers.〔Schmidt, Douglas et al. ''Pattern-Oriented Software Architecture Volume 2: Patterns for Concurrent and Networked Objects. Volume 2.'' Wiley, 2000.〕 ==Structure== * Resources: Any resource that can provide input to or consume output from the system. * Synchronous Event Demultiplexer: Uses an event loop to block on all resources. When it is possible to start a synchronous operation on a resource without blocking, the demultiplexer sends the resource to the dispatcher. * Dispatcher: Handles registering and unregistering of request handlers. Dispatches resources from the demultiplexer to the associated request handler. * Request Handler: An application defined request handler and its associated resource. 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Reactor pattern」の詳細全文を読む スポンサード リンク
|